home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "Wexl1.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
-
- //---------------------------------------------------------------------------
-
- void ExChange (String &x, String &y)
- {
- String z = x; x = y; y = z;
- }
-
- void ExChange (double &x, double &y)
- {
- double z = x; x = y; y = z;
- }
-
- void ShowIt (String x, String y)
- {
- Form1->Panel1->Caption = x;
- Form1->Panel2->Caption = y;
- }
-
- void ShowIt (double x, double y)
- {
- Form1->Panel1->Caption = String (x);
- Form1->Panel2->Caption = String (y);
- }
-
- //---------------------------------------------------------------------------
-
- String Text1, Text2;
- double Zahl1, Zahl2;
- bool Modus;
- TForm1 *Form1;
-
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- Text1 = InputBox
- ("1. String","BestΣtigen oder NEU","Hallo");
- Text2 = InputBox
- ("2. String","BestΣtigen oder NEU","Hoppla");
- ShowIt (Text1, Text2);
- Modus = true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button2Click(TObject *Sender)
- {
- Zahl1 = StrToFloat (InputBox
- ("1. Zahl","BestΣtigen oder NEU","0"));
- Zahl2 = StrToFloat (InputBox
- ("2. Zahl","BestΣtigen oder NEU","1"));
- ShowIt (Zahl1, Zahl2);
- Modus = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button3Click(TObject *Sender)
- {
- if (Modus)
- {
- ExChange (Text1, Text2);
- ShowIt (Text1, Text2);
- }
- else
- {
- ExChange (Zahl1, Zahl2);
- ShowIt (Zahl1, Zahl2);
- }
- }
- //---------------------------------------------------------------------------
-